This is yet another of those automatic screen blanking utilities, called AutoIdle. It should be compatible with all versions of the Macintosh, including a Mac II with multiple screens. It is also compatible with Multifinder.
To use it, you place the AutoIdle file in your System Folder and reboot the machine. After 5 minutes of inactivity, the screen will be blanked and an icon will appear at random places of the screen. In general, AutoIdle tries to display the icon of the application that is running. The name of the application will appear under the icon. If AutoIdle can't locate the appropriate icon, it will display a gray square.
To restore the screen, move the mouse, click the mouse, hit a key, or insert a diskette. The screen will also be restored if a window is created or removed from the screen. (This is useful when downloading a file, for example, since you will notice when the download finished.) Any of these actions also resets the 5 minute delay.
If you move the mouse in a special rectangle of the screen, it will be blanked immediately. Initially this is defined by the coordinates (0, 0) and (2, 2), which is the top left corner of the screen, but can be changed. You must leave the mouse in that position for about 1/2 second before the screen will be blanked.
One advantage of AutoIdle is that it doesn't take over the machine when it blanks the screen. In fact you can be downloading a file from a BBS and the screen can be blanked, yet the download will continue. The same is true of printing.
The downside of this is that AutoIdle does not save the original screen display and relies on the application to regenerate it. Also, it doesn't try to prevent the application from changing the display. If the application does change the display the utility will just blank the screen again.
AutoIdle works by intercepting the certain traps in the Macintosh, and blanking/restoring the screen when the application calls those traps. This design makes it very unobtrusive, but it also means that AutoIdle won't get control unless the application calls one of these traps. So if you are doing a long computation, the screen might never be blanked.
You can customize AutoIdle using the Control Panel. (Thanks to Rob Chandhok of Carnegie Mellon University for writing this code.) The following describes what the options mean:
• Blanking delay is the number of seconds of "idleness" before the screen is blanked.
• The Icon move delay is how often the icon moves around.
• Mouse threshold is how far you need to move the mouse for AutoIdle to think that your machine isn't idle.
• Dim now contains the screen coordinates of the area that immediately blanks the screen.
AutoIdle is completely free; no shareware fees required. You may distribute it to anyone, provided you do not charge for it. If you do pass it along, please include this documentation file.
I know of 2 minor bugs:
(1) If you click in the menu bar just when AutoIdle is about to blank the screen, your menu bar might end up erased. (This doesn't happen often, because the timing must be exact.) The solution is to move the mouse to the Dim Now rectangle (top left corner of the screen), wait for the full screen to be blanked, and move the mouse again.
(2) Certain virus protection utilities put up alerts if a program tries to do something "questionable". If that alert appears while the screen is blanked, then you may need to respond to the alert twice. The first time will "unblank" the screen and throw away your keystroke or mouse click. The second time will be passed to the virus utility. This situation doesn't arise very often since most applications don't activate these virus utilities. AutoIdle won't affect the ability of these utilities to protect your system.
Please send me any problems or comments about AutoIdle. Send those cards & letters to:
Larry Rosenstein
182 Muir Avenue
Santa Clara, CA 95051
Usenet: {sun, nsc}!apple!lsr
CSNet: lsr@Apple.com
AppleLink: Rosenstein1
You can also reach Rob Chandhok electronically via: chandhok@cs.cmu.edu or on AppleLink as A14.
Change History:
1.0a7 11/6/87
• First version posted to Usenet & beyond.
1.0a10 12/21/87
• Second version posted to Usenet.
• Fixed bug with not preserving the current port (some applications would get a funny font in its menus, or start using the wrong port).
• Made mouse move restore the screen.
• Clicking is not required to blank the screen immediately.
• Use a patch to PostEvent to tell when an event comes in.
• Calls to TickCount can cause screen blanking.
• Preserve most of the registers.
• Fixed problem with color support; needed to set the current GDevice before calling Index2Color.
• Shrink the GrayRgn to nothing when blanking to prevent "behaved" applications from drawing on the screen.
2/23/88
• Use Get1IndResource to read icon; under Suitcase, AutoIdle would read Suitcase icon if app didn't have ICN# 128 (like the Finder)
3/16/88
• Bite the bullet and use the BNDL, FREF, etc. to find the correct icon. This should find the real icon in all cases except for programs that are not of type APPL (eg, Finder, DA Handler). For these programs, we use the old search path trick.
1.0a12 4/21/89
• Check that A5^ is not 0, to support MPW Tools that don't provide a Quickdraw world.